﻿using System;
using System.Collections.Generic;

namespace Fuse8.ContentManagementFramework.Domain.Bases
{
    public class CmsTemplateRegionComparer : IEqualityComparer<CmsTemplateRegion>
    {
        #region IEqualityComparer<CmsTemplateRegion> Members

        public bool Equals(CmsTemplateRegion x, CmsTemplateRegion y)
        {
            return (x != null) && (y != null) ?
                x.Id.Equals(y.Id) :
                true;
        }

        public int GetHashCode(CmsTemplateRegion obj)
        {
            return obj != null ?
                obj.Id.GetHashCode() :
                0;
        }

        #endregion
    }
}
